<div class="tcity_tit"> <i class="fa fa-map-marker"></i><a href="javascript:void(0);"><b><?php echo $this->_var['site_name']; ?></b> <img src="themes/haohaios/images/city_choose.png" width="7" height="4"></a> </div>
<div class="city">
    <div class="city-title">
        <p class="city_tit_l"><b>选择地区</b></p>
        <p class="city_tit_r"><a href="javascript:void(0);" class="close-city"><img src="themes/haohaios/images/city_close.gif"></a></p>
    </div>
    <div class="city-content">
        <?php $_from = $this->_var['site_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'site');$this->_foreach['site'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['site']['total'] > 0):
    foreach ($_from AS $this->_var['site']):
        $this->_foreach['site']['iteration']++;
?>
        <dl>
            <dt><a href="?cid=<?php echo $this->_var['site']['city_id']; ?>"<?php if ($this->_var['site']['city_id'] == $this->_var['cid']): ?> class="cur"<?php endif; ?>><?php echo $this->_var['site']['region_name']; ?></a></dt>
            <dd>
                <?php $_from = $this->_var['site']['dis']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'dis');$this->_foreach['dis'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['dis']['total'] > 0):
    foreach ($_from AS $this->_var['dis']):
        $this->_foreach['dis']['iteration']++;
?>
                <a href="?cid=<?php echo $this->_var['dis']['region_id']; ?>"<?php if ($this->_var['dis']['region_id'] == $this->_var['cid']): ?> class="cur"<?php endif; ?>><?php echo $this->_var['dis']['region_name']; ?></a>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </dd>
        </dl>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </div>
</div>
<div class="city-bg"></div>
<script>
$(function () {
    H_login = {};
    H_login.openLogin = function(){
        $('.tcity_tit a').click(function(){
            $('.city').show();
            $('.city-bg').show();
        });
    };
    H_login.closeLogin = function(){
        $('.close-city').click(function(){
            $('.city').hide();
            $('.city-bg').hide();
        });
    };
    H_login.run = function () {
        this.closeLogin();
        this.openLogin();
        //this.loginForm();
    };
    H_login.run();
});
</script>